var web3 = require('./getWeb3');
var BigNumber = require('bignumber.js');

//使用私钥 签名一个交易
web3.eth.accounts.signTransaction({
    to: '0x6EE05e6FBaE01d023cE4DFb416A2730c1e6aE36c',
    value: '1000000000',
    gas: 2000000
}, '0xed87fb702bd2ff9a9cda77644dea8c912a66466d14b48b7ad9c65617192073cc')
.then(console.log);

/* 打印结果:
 {
   messageHash: '0xacf451fbdb2a08e82482c39e8f78e3b7319f54fb9485c78c9b479bcee25c062d',
   v: '0x0a96',
   r: '0x9fd9e7e6aa47b5277ff35c77cd561a281cd189a77e4c0cbe82fca210b4d7f67a',
   s: '0x4b0b99f9b6acd25a1de08295772ad2c8fe7cdb3df9f1d3d93b505346aa54f153',
   rawTransaction: '0xf86b808504a817c800831e8480946ee05e6fbae01d023ce4dfb416a2730c1e6ae36c843b9aca0080820a96a09fd9e7e6aa47b5277ff35c77cd561a281cd189a77e4c0cbe82fca210b4d7f67aa04b0b99f9b6acd25a1de08295772ad2c8fe7cdb3df9f1d3d93b505346aa54f153',
   transactionHash: '0x94b8243e0677415014a53886c1146f157e1fd5dc981044799745d966a81baedc'
 }
 
 
 */
